// Copyright (c) 2023 CHANGLEI. All rights reserved.

import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:tverify/src/tverify_method_channel.dart';
import 'package:tverify/src/ui_decorator.dart';
import 'package:tverify/tverify_platform_interface.dart';

class MockTverifyPlatform with MockPlatformInterfaceMixin implements TverifyPlatform {
  @override
  Future<void> initLogin(String appId) => Future.value();

  @override
  Future<Map<String, dynamic>?> preLogin() => Future.value(Map.identity());

  @override
  Future<Map<String, dynamic>?> login(UIDecorator decorator) => Future.value(Map.identity());

  @override
  Future<Map<String, dynamic>?> getSimInfo() => Future.value(Map.identity());

  @override
  Future<bool?> deleteScrip() => Future.value(false);

  @override
  Future<void> setTimeout(Duration duration) => Future.value();

  @override
  Future<void> dismissLogin([bool animated = true]) => Future.value();

  @override
  Future<void> certificationNumber(String number) => Future.value();

  @override
  Future<String?> getNetworkType() => Future.value();

  @override
  Future<String?> getOperatorType() => Future.value();

  @override
  Future<void> setDebugModel(bool isDebug) => Future.value();

  @override
  Future<void> setLoginBtn(String text) => Future.value();

  @override
  Future<void> setSecondPrivacyCallback(bool isCallback) => Future.value();

  @override
  void addCheckboxCheckedListener(ValueChanged<Map<String, dynamic>?> callback) {}

  @override
  void addLoginClickCompleteListener(ValueChanged<Map<String, dynamic>?> callback) {}

  @override
  void addLoginClickStartListener(ValueChanged<Map<String, dynamic>?> callback) {}

  @override
  void addCheckboxCheckedChangeListener(ValueChanged<bool> callback) {}

  @override
  void addAuthLoginListener(VoidCallback callback) {}

  @override
  void addPressBackListener(VoidCallback callback) {}

  @override
  void removeCheckboxCheckedListener(ValueChanged<Map<String, dynamic>?> callback) {}

  @override
  void removeLoginClickCompleteListener(ValueChanged<Map<String, dynamic>?> callback) {}

  @override
  void removeLoginClickStartListener(ValueChanged<Map<String, dynamic>?> callback) {}

  @override
  void removeCheckboxCheckedChangeListener(ValueChanged<bool> callback) {}

  @override
  void removeAuthLoginListener(VoidCallback callback) {}

  @override
  void removePressBackListener(VoidCallback callback) {}
}

void main() {
  final TverifyPlatform initialPlatform = TverifyPlatform.instance;

  test('$MethodChannelTverify is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelTverify>());
  });
}
